package com.sgam.mf.domain.sys;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.Fetch;
import org.hibernate.annotations.FetchMode;

import com.sgam.mf.domain.ref.AbstractRefEntity;



@Entity
@Table(name = "REF_DOMAINS")
public class TreeDomains  extends AbstractRefEntity {
	
	@OneToMany(cascade = CascadeType.ALL, fetch=FetchType.EAGER, orphanRemoval=true)
	@Fetch(value = FetchMode.SUBSELECT)
	@JoinColumn(name="ref_domain_fk")
	private List<TreeServices> treeServices = new ArrayList<TreeServices>();

	public List<TreeServices> getTreeServices() {
		return treeServices;
	}

	public void setTreeServices(List<TreeServices> treeServices) {
		this.treeServices = treeServices;
	}

	
	
}
